/**
 * Copyright (C), 2015-2019, XXX有限公司
 * FileName: GoodsbillReceiptDetailedServiceImpl
 * Author:   李毅
 * Date:     2019/10/18 10:57
 * Description: 货物回执单业务实现类
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.ymtms.supplycar.service.impl;

import com.ymtms.supplycar.dao.GoodsbillReceiptDetailedMapper;
import com.ymtms.supplycar.exception.CarException;
import com.ymtms.supplycar.pojo.GoodsbillReceiptDetailed;
import com.ymtms.supplycar.service.GoodsbillReceiptDetailedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 〈一句话功能简述〉<br> 
 * 〈货物回执单业务实现类〉
 *
 * @author 李毅
 * @create 2019/10/18
 * @since 1.0.0
 */
@Service
public class GoodsbillReceiptDetailedServiceImpl implements GoodsbillReceiptDetailedService {

    @Autowired
    private GoodsbillReceiptDetailedMapper goodsbillReceiptDetailedMapper;

    @Override
    public GoodsbillReceiptDetailed findGoodsbillReceiptDetailedGmid(Integer gmid) {
        GoodsbillReceiptDetailed goodsbillReceiptDetailed = goodsbillReceiptDetailedMapper.selectBygmid(gmid);
        if (goodsbillReceiptDetailed == null){
            throw new CarException("查询失败，请重试！");
        }
        return goodsbillReceiptDetailed;
    }

}